package com.navinfo.platform.dataanalysis.dto.condition;

import com.navinfo.platform.common.dto.DataInfo;
import lombok.Data;

/**
 * 普通刹车次数条件
 */
@Data
public class CsbCondition extends AbstractCondition {
    @Override
    public boolean subCondition(DataInfo dataInfo, Object ... externalParam) {
        int speed = dataInfo.getSpeed();
        int brake = dataInfo.getBrake();
        return speed > Integer.parseInt(param[0]) && speed <= Integer.parseInt(param[1]) && brake == 1;
    }
}
